﻿@model KRM.Core.tblPersonal
@{
    ViewBag.Title = "Edit Personal Position Info";
    var bankAccount =Model.tblBankAccount;
}
<form action="/BankAccount/AddBankAccount" method="POST" class="form-horizontal" id="frBankAccount">
    @if (bankAccount!=null){

    <input type="hidden" value="@Model.Id" name="PersonalId"/>
    <input type="hidden" value="@bankAccount.Id" name="Id"/>
        <div class="form-body">
            <h3 class="form-section" style="margin-top: -10px">Bank Account</h3>
            <div id="msg-frBankAccount"></div>
            <div class="row">
                <div class="col-md-12">
                    <div class="note note-info">
                        <p>Bank account information</p>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">Bank Account Number<span class="required">*</span></label>
                        <div class="col-md-8">
                            <input type="text" name="BankAccountNumber"class="form-control" value="@bankAccount.BankAccountNumber" required="required">
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">Bank Account Sort Code<span class="required">*</span></label>
                        <div class="col-md-8">
                            <input type="text" name="BankAccountSortCode"class="form-control" value="@bankAccount.BankAccountSortCode" required="required">   
                        </div>
                    </div>
                </div>
                
            </div>

            <div class="row">
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">Name on Bank Account<span class="required">*</span></label>
                        <div class="col-md-8">
                            <input type="text" name="RegisteredName"class="form-control" value="@bankAccount.RegisteredName">
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">Type of Account<span class="required">*</span></label>
                        <div class="col-md-8">
                            <input type="text" name="TypeOfAccount"class="form-control" value="@bankAccount.TypeOfAccount" required="required">   
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <div class="form-group">
                        <label class="control-label col-md-2">Branch Address<span class="required">*</span></label>
                        <div class="col-md-10">
                            <textarea type="text" name="BranchAddress"class="form-control" rows="3" required="required" >@bankAccount.BranchAddress</textarea>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-actions fluid">
            <div class="row">
                <div class="col-md-6">
                    <div class="col-md-offset-3 col-md-9">
                        <button type="submit" class="btn btn green"><i class="icon-ok"></i>Save Changes</button>
                        <button type="reset" class="btn btn-default">Reset</button>                              
                    </div>
                </div>
                <div class="col-md-6">
                </div>
            </div>
        </div>
}
else
{

    <input type="hidden" value="@Model.Id" name="PersonalId"/>
    <input type="hidden" value="0" name="Id"/>
    <div class="form-body">
        <h3 class="form-section" style="margin-top: -10px">Bank Account</h3>
        <div id="msg-frBankAccount"></div>
        <div class="row">
            <div class="col-md-12">
                <div class="note note-success">
                    <p>Bank account information is empty</p>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label class="control-label col-md-4">Bank Account Number<span class="required">*</span></label>
                    <div class="col-md-8">
                        <input type="text" name="BankAccountNumber"class="form-control" value="" required="required">
                    </div>
                </div>
            </div>
            <div class="col-md-6">
                <div class="form-group">
                    <label class="control-label col-md-4">Bank Account Sort Code<span class="required">*</span></label>
                    <div class="col-md-8">
                        <input type="text" name="BankAccountSortCode"class="form-control" value="" required="required">   
                    </div>
                </div>
            </div>
                
        </div>

        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label class="control-label col-md-4">Name on Bank Account<span class="required">*</span></label>
                    <div class="col-md-8">
                        <input type="text" name="RegisteredName"class="form-control" value="">
                    </div>
                </div>
            </div>
            <div class="col-md-6">
                <div class="form-group">
                    <label class="control-label col-md-4">Type of Account<span class="required">*</span></label>
                    <div class="col-md-8">
                        <input type="text" name="TypeOfAccount"class="form-control" value="" required="required">   
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                <div class="form-group">
                    <label class="control-label col-md-2">Branch Address<span class="required">*</span></label>
                    <div class="col-md-10">
                        <textarea  name="BranchAddress"class="form-control" rows="3" required="required" ></textarea>
                    </div>
                </div>
            </div>
        </div>
    </div>
        <div class="form-actions fluid">
            <div class="row">
                <div class="col-md-6">
                    <div class="col-md-offset-3 col-md-9">
                        <button type="submit" class="btn btn green"><i class="icon-ok"></i>Save Changes</button>
                        <button type="reset" class="btn btn-default">Reset</button>                              
                    </div>
                </div>
                <div class="col-md-6">
                </div>
            </div>
        </div>

}
</form>